package com.wxy.jk.pojo.vo.req.page;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

@Data
public class PageReqVo {
    private static final int DAFAULT_SIZE=10;
    @ApiModelProperty("页码")
    long page;
    @ApiModelProperty("每页的大小")
    long size;


    public long getPage(){
        return Math.max(page,1);
    }

    public long getSize() {
        return size < 1 ? DAFAULT_SIZE : 10;
    }
}
